home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / amac40.zip / MACR31.QM < prev    next >
Text File  |  1991-08-04  |  43KB  |  879 lines

  1. *                      MacroMaker  MACR31.QM, v3.1b
  2. *                        Written by Tom Hogshead
  3. *                 With Macro Contributions By Tim Farley
  4. *                             August 4, 1991
  5. *
  6. *    @(2) - Refresh Macro Buffer With "Standard" Macfile
  7. *    @(3) - Merges Designated Txtfile With Current Macros, Reads Macfile
  8. *    @(4) - Appends Txtfile To Standard Txtfile & Macfile, Reads Macfile
  9. *    @(5) - Gets Error File In Window
  10. *    @(6) - Makes Dummy Txtfile From Current Macros
  11. *    @(7) - Makes & Reads Dummy Macfile From Txtfile
  12. *    @(t) - Makes & Reads Dummy Macfile From Txtfile, SMALL
  13. *    @(8) - Reads Macfile of Current Txtfile
  14. *    @(9) - Makes Macfile of Current Txtfile, No Macfile Read
  15. *    @(0) - Makes & Reads Macfile of Txtfile, With Error Window
  16. *    @(q) - Makes & Reads Macfile of Txtfile, SMALL
  17. *    @(f1)- Makes Single Column Macro
  18. *    @(f2)- Puts Command Key Beside A Single Command In A Macro
  19. *    @(f3)- Puts Command Key Beside ALL Commands In A Macro
  20. *    @(f4)- Gets A Single Command And It's Key On Screen
  21. *    @(f5)- Test TRUE/FALSE Results, Tim Farley, Author
  22. *    @(h) - Select Index Item With Cursor Line, Then <Enter>              |chg
  23. *
  24. * (Index) Use      - How to locate macro or item from Index using @h
  25. * (Description)    - MacroMaker Macros
  26. * (Requirements)   - and use
  27. * (Startup)        - See MACR.DOC for startup instructions
  28. * (Macros)         - MacroMaker Macros
  29. * (Other) Macros   - not included
  30. * (Version) history
  31. *
  32. *-- eoi
  33.  
  34. * (Index) Use;
  35. *
  36. * To locate a macro or item in this file, press @h, place the cursor
  37. * line on the desired item in the Index above, and press <enter>.
  38. * See BOOKxx.QM for more details.
  39.  
  40. * (Description):
  41.  
  42. * (MacroMaker) MACR31.ZIP Contains QEdit macros to easily convert
  43. * macros to & from text/binary (txtfile/macfile) using QMAC macro
  44. * translator.
  45.  
  46. * See RFRMxx.QM for other commenting and un-commenting macros.
  47.  
  48. * (Requirements) and Use (see MACR.DOC for (startup) instructions):
  49. *
  50. *         1. Txtfile name extension MUST be [file].QM, Macfile [file].MAC.
  51. *         2. Change ram disk c:\ (also in batch files) for your setup.
  52. *            Ram disk is optional but faster than a hard drive. Use any
  53. *            active drive letter to replace c:\.
  54. *         3. Batch files must be in path or current directory. INSERT must
  55. *            be ON. Run macros and press Enter to continue when paused.
  56. *         4. Modify "e:\qe\MACROS.xxx" in macros to your "standard" macro.
  57. *            Be careful to use or not use extension as shown, with spaces.
  58. *         5. Be sure to change "e:\qe\qconfig.dat" in the macros @f2 -
  59. *            @f4 below to the location of your qconfig.dat in your
  60. *            setup, and convert with QMAC.
  61. *         6. Be sure to change "e:\qe\macros" in the macros @2 and
  62. *            @4 below to the name and location of your standard macros,
  63. *            and convert with QMAC.
  64.  
  65. * In order for macros @f2 - @f4 to find a command in QCONFIG.DAT, there
  66. * must be at least eight blank spaces betweeen the end of the command
  67. * key and the beginning of the command. If your QCONFIG.DAT has fewer
  68. * spaces, the macros must be modified in the first 'FIND' line.
  69.  
  70. * Insert must be ON.
  71.  
  72. * Replacing C:\ with a ram drive will make the macros run considerably
  73. * faster.
  74.  
  75. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  76.  
  77. * To BEGIN, just type "START MACR" <Enter>. All pertinent files will be
  78. * loaded in the "Ring" for viewing, and MACR31.MAC is read.
  79. * Alternatively, type "START MACR 0" <Enter> and the disk copies of all
  80. * files in the "Ring" will be loaded ready for editing, saving time.
  81.  
  82. * 
  83. *┌───────────────────────────────────────────────────────────┐
  84. *│   @(2) Refreshes macro buffer with "standard" macfile     │
  85. *└───────────────────────────────────────────────────────────┘
  86. * Remember you MUST modify "e:\qe\macros.mac" with your "standard" macfile.
  87. *
  88. @2 MacroBegin
  89.     MacroRead
  90.     "e:\qe\macros.mac"  *<<<<<CHANGE
  91.     Return
  92. *
  93. * 38 bytes Fri  09-14-1990  14:05:43
  94.  
  95. * 
  96. *┌────────────────────────────────────────────────────────────────┐
  97. *│   @(3) Merges designated txtfile [file].qm with current macros │
  98. *└────────────────────────────────────────────────────────────────┘
  99.  
  100. @3 macrobegin
  101.    editfile "NUL" return                * load NUL file
  102.    "Merge macro ?" cursorright          * query for macro name,
  103.                                         * no extension
  104.    markcharacter                        * start mark
  105.    pause cut quit                       * cut macro name (no extension)
  106.                                         *  to scrap
  107.    macrowrite "dum4.mac" return return  * write current macros to temp
  108.                                         *  file
  109.    DOS "qmacM " paste return return     * append designated macros to
  110.                                         * current macros
  111.    onewindow                            * close all windows
  112.    horizontalwindow                     *
  113.    editfile "c:!" return                * open error file in window
  114.    quit                                 * quit in case earlier error
  115.                                         *  file loaded
  116.    editfile return                      * load error file in window 1
  117.    insertdate  inserttime               * put date in c:!
  118.    find "(" return return               * find first error
  119.  jfalse NOERROR:                        * if no error go to NOERROR
  120.    wordright                            *ELSE move to error line #
  121.    unmarkblock                          * un-mark any marked blocks
  122.    markblockbegin wordright             * mark error line #
  123.    cursorleft                           * move back one space to end of line #
  124.    markblockend copy                    * mark and copy line # to scrap
  125.    savefile                             * save error file
  126.    prevwindow                           * go back to txtfile we want to append
  127.                                         *   to
  128.    gotoline paste return                * move to line with first error
  129.    makectrofscreen                      * put cursor in center of screen
  130.    pause zoomwindow                     * zoomwindow for better viewing
  131.  jump CONTINUE:                         *
  132.  NOERROR:                               * if no errors, come here
  133.    prevwindow zoomwindow                * enlarge txtfile we started in
  134.  CONTINUE:
  135.    editfile "dum4.qm" return            * load txtfile with appended macro
  136.                                         * on bottom
  137.    splitline newfile "N" return         * re-load in case previous copy is
  138.                                         *  loaded
  139.    endfile addline                      * insert blank line for footing
  140.   "*...Tom Hogshead "                   * insert name (change to yours)
  141.   insertdate inserttime                 * insert date and time
  142.   "Appended "                           *
  143.   paste                                 * paste file name we are appending
  144.   endline                               * move to end of file name
  145.   ".qm to current macros"               * finish message
  146.   unmarkblock                           * un-mark all blocks
  147.   savefile                              * save new txtfile with appended
  148.                                         *  macro
  149.   macroread "dum4.mac" return           * read current + appended macros
  150. *
  151. * 262 bytes Wed  05-01-1991  12:26:00
  152.  
  153. * 
  154. *┌───────────────────────────────────────────────────────────┐
  155. *│   @(4) Appends txtfile [file].qm  to a "standard" txtfile │
  156. *│     named macros.qm and reads appended macfile.           │
  157. *└───────────────────────────────────────────────────────────┘
  158. *  Remember you MUST modify "e:\qe\macros" (no extension) in this
  159. *  macro to your "standard" macfile.
  160.  
  161. * Be careful that the macro size of the txtfile you are appending plus
  162. * the size of your standard macros do not exceed 2k, the macro buffer
  163. * limitation. If this occurs, you will get an error message, and the
  164. * macros will not be appended.
  165.  
  166. @4 macrobegin
  167.    unmarkblock                          * unmarkblock
  168.    savefile                             * save current txtfile in case changed
  169.    DOS "qmacTA2 "                       * append
  170.    currentfilename                      * current txtfile
  171.    backspace backspace backspace        * delete current txtfile extension
  172.    " "                                  * add space
  173.   "e:\qe\macros"  *<<<<<CHANGE          * Standard macros name, no extension
  174.    return                               * start batch file
  175.    begline insertline                   * insert blank line
  176.    dropanchor currentfilename           * put current file name on line
  177.    storescrbuff "1" return              * store to scratch 1 for footing
  178.    cut                                  * cut name to scrap which deletes line
  179.    editfile "c:!" return quit           * quit error file if loaded
  180.    editfile paste return                * get back to current txtfile
  181.    onewindow                            * close all windows
  182.    horizontalwindow                     * open window
  183.    editfile "c:!" return                * get error file in window 2
  184.    insertdate  inserttime               * put date in c:!
  185.    find "(" return return               * find first error
  186.  jfalse NOERROR:                        * if no errors, go to NOERROR
  187.    wordright                            *ELSE move to error line #
  188.    unmarkblock                          * un-mark any marked blocks
  189.    markblockbegin wordright             * mark error line #
  190.    cursorleft                           * move back one space to end of line #
  191.    markblockend copy                    * mark and copy line # to scrap
  192.    savefile                             * save error file
  193.    prevwindow                           * go back to txtfile we want to append
  194.                                         *   to
  195.    gotoline paste return                * move to line with first error
  196.    makectrofscreen                      * put cursor in center of screen
  197.    pause zoomwindow                     * zoomwindow for better viewing
  198.  jump CONTINUE:                         *
  199.  NOERROR:                               *
  200.    prevwindow zoomwindow                * no error, go to
  201.  CONTINUE:
  202.    editfile "c:$" return quit           *
  203.    editfile       return killfile       * load dum3.qm
  204.    editfile "dum3.qm"    return quit
  205.    editfile              return         * load dum3.qm
  206.    begfile cursordown endline           * stamp
  207.    cursorright
  208.   "from:" cursorright
  209.    getscrbuff "1" return
  210.    unmarkblock endfile return           * line on bot
  211.   "*" cursorright "Tom Hogshead"
  212.    cursorright cursorright
  213.    insertdate inserttime                * - name/date bot
  214.   "Appnd:" cursorright
  215.    getscrbuff "1" return unmarkblock    * - file on bot
  216.    savefile macroread currentfilename   * read dum3.mac
  217.    backspace backspace "MAC" return     *
  218. *
  219. * 229 bytes Wed  05-01-1991  12:45:43
  220.  
  221. * 
  222. *┌──────────────────────────────────────────────────────────────┐
  223. *│   @(5) Gets error file (c:!) in window. Press ENTER to remove│
  224. *└──────────────────────────────────────────────────────────────┘
  225.  
  226. @5  macrobegin
  227.     horizontalwindow                                         * make window
  228.     editfile "c:!" return                                    * load c:!
  229.     makectrofscreen pause zoomwindow                         * zoom on pause
  230.     quit                                                     * quit c:!
  231. *
  232. * 17 bytes Fri  09-14-1990  14:05:55
  233.  
  234. * ┌────────────────────────────────────────────┐
  235. * │    @(6) Makes txtfile from current macros  │
  236. * └────────────────────────────────────────────┘
  237.  
  238. @6 macrobegin
  239.    macrowrite "c:$.mac" return return   * write to c:$.mac
  240.    DOS "qmact c:$" return return        * make c:$.qm
  241.    editfile "c:$.qm" return quit        * quit old c:$.qm
  242.    editfile return                      * load new c:$.qm
  243.    killfile                             * kill c:$.qm
  244.    endfile                              * to see newest macro
  245. *
  246. * 61 bytes Sat  09-15-1990  14:26:40
  247.  
  248. * 
  249. *┌───────────────────────────────────────────────────────────┐
  250. *│    @(7) Copies txtfile [file].QM to dummy txtfile.        │
  251. *│  Makes and reads macfile.                                 │
  252. *└───────────────────────────────────────────────────────────┘
  253.  
  254. @7 macrobegin
  255.    unmarkblock                          *
  256.    writeblock "c:$.qm" return           * copy file.qm
  257.    begline insertline                   *
  258.    dropanchor currentfilename           * get name
  259.    storescrbuff "1" return cut          *   to scratch
  260.    editfile return quit                 * load/quit c:$.qm             |3.1
  261.    editfile return                      * load c:$.qm
  262.    DOS "qmacbj c:$" return              * make c:$.mac
  263.    begline insertline                   *
  264.    dropanchor currentfilename           *
  265.    cut                                  * get name to scrap
  266.    editfile "c:!" return quit           * quit error file if already loaded
  267.    editfile paste return                * laod current file
  268.    onewindow                            * close all windows
  269.    horizontalwindow                     * one window
  270.    editfile "c:!" return                * load error file in window 2
  271.    insertdate inserttime                * put date and time
  272.    find "(" return return               * find first error
  273.  jfalse NOERROR:                        * if no errors, go to NOERROR
  274.    wordright                            *ELSE move to error line #
  275.    unmarkblock                          * un-mark any marked blocks
  276.    markblockbegin wordright             * mark error line #
  277.    cursorleft                           * move back one space to end of line #
  278.    markblockend copy                    * mark and copy line # to scrap
  279.    savefile                             * save error file
  280.    prevwindow                           * go back to txtfile we want
  281.                                         *   to append to
  282.    gotoline paste return                * move to line with first error
  283.    makectrofscreen                      * put cursor in center of screen
  284.    pause zoomwindow                     * zoomwindow for better viewing
  285.  jump CONTINUE:                         *
  286.  NOERROR:                               * if no errors, come here
  287.    prevwindow zoomwindow                * enlarge txtfile we started in
  288.  CONTINUE:                              *
  289.    DOS "qmact c:$" return return        * make c:$.qm
  290.    editfile "c:$.qm" return quit
  291.    editfile return                      * load c:$.qm
  292.    endfile addline                      *
  293.    "*" insertdate inserttime            * - name/date bot
  294.    getscrbuff "1" return unmarkblock    * - file on bot
  295.    killfile                             * kill c:$.qm
  296.    macroread currentfilename            * read c:$.mac
  297.    backspace backspace "MAC" return     *
  298. *
  299. * 185 bytes Wed  05-01-1991  13:19:11
  300. * 173 bytes Thu  05-16-1991  11:52:26 (TH removed unnecessary c:$.qm)
  301.  
  302. * 
  303. *┌───────────────────────────────────────────────────────────┐
  304. *│   @(8) READS macfile from txtfile [file].QM               │
  305. *└───────────────────────────────────────────────────────────┘
  306.  
  307. @8 macrobegin
  308.    macroread                            * start macroread
  309.    currentfilename                      * with current file name
  310.    backspace backspace                  * delete qm
  311.    "mac"                                * add mac
  312.    return                               * and do it
  313. *
  314. * 15 bytes Fri  09-14-1990  14:06:11
  315.  
  316. * 
  317. *┌───────────────────────────────────────────────────────────┐
  318. *│   @(9) Makes macfile from txtfile [file].QM, NO read      │
  319. *└───────────────────────────────────────────────────────────┘
  320.  
  321. @9 macrobegin
  322.    savefile                             * save file
  323.    DOS "qmacb "                         * start batch file
  324.    currentfilename                      * with current file
  325.    backspace backspace backspace        * delete extension
  326.    return                               * and do it
  327. *
  328. * 23 bytes Fri  09-14-1990  14:06:14
  329.  
  330. * 
  331. *┌───────────────────────────────────────────────────────────┐
  332. *│   @(0) Makes macfile from txtfile [file].QM               │
  333. *│   Loads macfile [file].MAC, With error window.            │
  334. *└───────────────────────────────────────────────────────────┘
  335.  
  336. @0 macrobegin
  337.    savefile                             * save file
  338.    DOS "qmacbj "                        * begin batch file
  339.    currentfilename                      * with current file name
  340.    backspace backspace backspace        * delete dot + extension
  341.    return                               * and do it
  342.    unmarkblock                          * un-mark all blocks
  343.    insertline begline                   * insert temp line
  344.    dropanchor currentfilename cut       * cut name to scrp
  345.    editfile "c:!" return quit           * quit c:!
  346.    editfile paste return                * load current file
  347.    onewindow                            * close all windows
  348.    horizontalwindow                     * one window
  349.    editfile "c:!" return                * load error file in window 2
  350.    insertdate inserttime                * put date and time
  351.    find "(" return return               * find first error
  352.  jfalse NOERROR:                        * if no errors, go to NOERROR
  353.    wordright                            *ELSE move to error line #
  354.    unmarkblock                          * un-mark any marked blocks
  355.    markblockbegin wordright             * mark error line #
  356.    cursorleft                           * move back one space to end of line #
  357.    markblockend copy                    * mark and copy line # to scrap
  358.    savefile                             * save error file
  359.    prevwindow                           * go back to txtfile we want to append
  360.                                         *   to
  361.    gotoline paste return                * move to line with first error
  362.    makectrofscreen                      * put cursor in center of screen
  363.    pause zoomwindow                     * zoomwindow for better viewing
  364.  jump CONTINUE:                         *
  365.  NOERROR:                               * if no errors, come here
  366.    prevwindow zoomwindow                * enlarge txtfile we started in
  367.  CONTINUE:                              *
  368.    macroread                            * begin macroread
  369.    currentfilename                      * with current file
  370.    backspace backspace                  * delete qm
  371.    "mac"                                * add mac
  372.    return                               * and read macfile
  373. *
  374. * 94 bytes Wed  05-01-1991  13:38:07
  375.  
  376. * 
  377. *┌───────────────────────────────────────────────────────────┐
  378. *│    @(t) Copies txtfile [file].QM to dummy txtfile.        │
  379. *│  Makes and reads macfile, small version                   │
  380. *└───────────────────────────────────────────────────────────┘
  381.  
  382. * This is an alternate version of @7. Errors during macro conversion are
  383. * not saved in an error window. It is much smaller than @7.
  384.  
  385. @t      MacroBegin                      *
  386.         unmarkblock                     *
  387.         WriteBlock "c:$.qm" Return      * copy file/block to temp file
  388.         DOS "qmacb c:$" Return Return   * make temp macfile
  389.         DOS "qmact c:$" Return Return   * make temp txtfile
  390.         EditFile "c:$.qm" Return Quit   * quit temp file from ring
  391.         EditFile Return                 * load temp txtfile
  392.         killfile                        * kill temp file
  393.         MacroRead "c:$.Mac" Return      * read temp macfile
  394. *
  395. * 95 bytes Fri  09-14-1990  14:06:07
  396.  
  397. * 
  398. *┌───────────────────────────────────────────────────────────┐
  399. *│   @(q) Makes macfile from txtfile [file].QM               │
  400. *│   Loads macfile [file].MAC, NO error window, SMALL.       │
  401. *└───────────────────────────────────────────────────────────┘
  402.  
  403. @q macrobegin
  404.    savefile                             * save file
  405.    DOS "qmacb "                         * begin batch file
  406.    currentfilename                      * with current file
  407.    backspace backspace backspace        * delete dot+extension
  408.    return                               * run batch file
  409.    return
  410.    macroread                            * begin macroread
  411.    currentfilename                      * of current file
  412.    backspace backspace                  * delete qm
  413.    "mac"                                * add mac extension
  414.    return                               * read new macfile
  415. *
  416. * 35 bytes Fri  09-14-1990  14:06:22
  417.  
  418.  
  419. * 
  420. * ----------------------------------------------------------------------
  421. * @(h) Finds first word on cursor line marked in document below
  422. * ----------------------------------------------------------------------
  423.  
  424. * See BOOKxx.QM for use of @h.
  425.  
  426. @h macrobegin
  427.         unmarkblock                     * Unmark any marked blocks
  428.         defaultwordset                  * In case altwordset on
  429.         begfile                         *
  430.         endpara                         * Move to end of Index
  431.         markline                        * Mark it
  432.         begfile                         * Move to bof
  433.         find "(" return "L" return      * Locate first Index selection line
  434.     jfalse NOMARK:                      *
  435.         makectrofscreen                 * Show top of file
  436.         begfile                         * Move back to bof
  437.         unmarkblock markline markline   * And highlight line 1
  438.         prevposition                    * Move back to first selection line
  439.         begline                         * Cursor in col 1
  440.         pause                           * Pause for Index selection
  441.         wordright markword              * Mark first word on line
  442.         copy                            * Copy word to scrap
  443.         endpara                         * Go to end of Index
  444.         find "(" paste ")"              *
  445.         return "I" return               * Find first marked word in doc
  446.     jfalse NOMARK:                      *
  447.         begline                         * If mark found go to begline
  448.         maketopofscreen scrollup        * Cursor on line 2
  449.     jump END:                           *
  450.     NOMARK:                             *
  451.         begfile                         * If no mark found go to begfile
  452.     END:
  453. *
  454. * 52 bytes Wed  07-31-1991  14:43:31 (TH @h, @4 in MACRxx.QM)
  455.  
  456. * 
  457. * ┌────────────────────────────────────┐
  458. * │   @(f1) Makes single column macro  │
  459. * └────────────────────────────────────┘
  460.  
  461. * To  make a single column macro with Alt_f1, place the cursor line
  462. * anywhere in a macro txtfile (after loading the macfile) and press Alt
  463. * and f1 at the same time. If a macro is not a marked block, the full
  464. * txtfile is made into a single column macro.
  465.  
  466. @f1 macrobegin
  467.         writeblock "c:$.qm" return      * copy block or file to c:$.qm
  468.         unmarkblock insertline begline  * insert temp line
  469.         dropanchor currentfilename cut  * cut currentfilename to scrap
  470.         DOS "qmacb c:$"  return  return * make macfile
  471.         DOS "qmact-n c:$" return return * make txtfile
  472.         editfile "c:$.qm" return quit   *
  473.         editfile return                 * load c:$.qm
  474.         endfile addline                 * insert blank line at end
  475.         "* " insertdate inserttime      * for date/time
  476.         paste unmarkblock               * get file name on line
  477.         killfile                        * kill c:$.qm
  478. *
  479. * 98 bytes Fri  09-14-1990  14:06:30
  480.  
  481. * 
  482. *┌──────────────────────────────────────────┐
  483. *│    @(f2) Puts key beside single command  │
  484. *└──────────────────────────────────────────┘
  485.  
  486. * To get the key for a single command in a macro, place the cursor line
  487. * on the command in a single column macro txtfile and press Alt_f2. The
  488. * key corresponding to the command will be listed next to the commmand.
  489.  
  490. @f2 macrobegin
  491.         unmarkblock insertline begline  * insert temp line
  492.         dropanchor currentfilename      *
  493.         storescrbuff "1" return         * get to scrbuff
  494.         cut                             * delete temp line
  495.         begline wordright markword      * get to command, mark it
  496.         copy                            * get to scrap
  497.         unmarkblock                     * unmark
  498.         editfile                        *
  499.        "e:\qe\qconfig.dat"  *<<<<<CHANGE
  500.         return                          * load qconfig.dat
  501.         begfile                         * go to begin qconfig.dat
  502.         FIND "         "                * insert 8 spaces before find
  503.         paste                           * paste command for find
  504.         return "IW" return              * find command in qconfig.dat
  505.  jfalse NOFIND:                         * mark if found, quit if not
  506.         wordright markcolumn            * move cursor to command
  507.         begline                         * go to  begline
  508.        "* "                             * insert asterisk space
  509.         begline markcolumn              * go to begline, include key
  510.         storescrbuff "2" return         * get key to scrbuff
  511.         cursordown                      * move down line
  512.         unmarkblock                     * unmark command
  513. *        quit                            * quit qconfig.dat
  514.         getscrbuff "1" return           * get currentfilename
  515.         cut                             * cut currentfilename
  516.         editfile paste return           * load currentfilename
  517.         markcolumn                      * start to mark block
  518.         gotocolumn "33" return          * postition to get key
  519.         getscrbuff "2" return           * get key
  520.         begline                         * go to begline
  521.         makectrofscreen                 * for better viewing
  522.         cursordown                      * move down to next command
  523.  jump END:                              * stop after getting key
  524.  NOFIND:                                * come here if no key for command
  525.         getscrbuff "1" return           * get currentfilename
  526.         cut                             * cut currentfilename
  527.         editfile paste return           * return to file
  528.         gotocolumn "33" return          * position to get key
  529.         "* "                            * insert asterisk space
  530.         cursordown                      * move down to next command
  531.         begline                         *
  532.  END:                                   *
  533. *
  534. * 145 bytes Mon  02-18-1991  12:32:15
  535.  
  536. * 
  537. *┌────────────────────────────────────────────────────────────────┐
  538. *│    @(f3) Puts key beside ALL commands in single column macfile │
  539. *└────────────────────────────────────────────────────────────────┘
  540.  
  541. * To get the keys for ALL commands in a macro, place the cursor
  542. * line at the top of a macro txtfile and press Alt_f3. An example of
  543. * this output is shown at the end of this macro. The keys corresponding
  544. * to each command will be listed also in a single column next to the
  545. * command.
  546.  
  547. @f3 macrobegin
  548.         unmarkblock insertline begline  * insert temp line
  549.         dropanchor currentfilename      *
  550.         storescrbuff "1" return         * 
  551.         cut                             * delete temp line
  552.  START:                                 *
  553.         endline begline                 * line blank? if so end
  554.  jfalse END:                            *
  555.         begline wordright markword      *
  556.         copy unmarkblock                * get command to scrap, unmark
  557.         editfile                        *
  558.        "e:\qe\qconfig.dat"  *<<<<<CHANGE
  559.         return                          * load qconfig.dat
  560.         begfile                         * go to begin qconfig.dat
  561.         FIND "         "                * insert 8 spaces before find
  562.         paste                           * paste command for find
  563.         return "IW" return              * find command in qconfig.dat
  564.  jfalse NOFIND:                         * mark if found, quit if not
  565.         wordright markcolumn begline    * move cursor to command
  566.        "* " begline markcolumn          * insert asterisk space
  567.         storescrbuff "2" return         * get key to scratch
  568.         cursordown unmarkblock          * move down line, unmark command
  569.         quit                            * quit qconfig.dat
  570.         getscrbuff "1" return           * get currentfilename
  571.         cut                             * cut currentfilename
  572.         editfile paste return           * load currentfilename
  573.         markcolumn                      * start to mark block
  574.         gotocolumn "33" return          * postition to get key
  575.         getscrbuff "2" return           * get key
  576.         begline makectrofscreen         * for better viewing
  577.         cursordown                      * move down to next command
  578.  jump START:                            * start on next command
  579.  NOFIND:                                * come here if no key for command
  580.         getscrbuff "1" return           * get currentfilename
  581.         cut                             * cut currentfilename
  582.         editfile paste return           * return to file
  583.         gotocolumn "33" return          * position to get key
  584.         "* "                            * insert asterisk space
  585.         cursordown                      * move down to next command
  586.         begline                         *
  587.  jump START:                            * do next line till done
  588.  END:                                   *
  589. *
  590. * 154 bytes Mon  02-18-1991  12:32:44
  591.  
  592. *-----------------
  593. * Here is what the macro Alt_f1 looks like by first marking it as a
  594. * block, then running @f1 by placing the cursor line on the line
  595. * below @f1 in c:$.qm and running @f3. (NOTE: an asterisk and
  596. * space have been added to column 1)
  597.  
  598. * *
  599. * * Converted by QMAC from: c:\$.mac
  600. * *
  601. * @f1     Macro_Begin                    <- (modified for SIZE macro)
  602. *         WriteBlock              * @w
  603. *         "c:$."                  *
  604. *         "qm"                    *
  605. *         Return                  * enter
  606. *         UnmarkBlock             * @u
  607. *         InsertLine              * ^n_i
  608. *         BegLine                 * home
  609. *         DropAnchor              * @a
  610. *         CurrentFilename         * ^n_n
  611. *         Cut                     * ^c_u
  612. *         DOS ""                  * ^n_o
  613. *         "qmacb "                *
  614. *         "c:$"                   *
  615. *         Return                  * enter
  616. *         Return                  * enter
  617. *         DOS ""                  * ^n_o
  618. *         "qmact-"                *
  619. *         "n c:$"                 *
  620. *         Return                  * enter
  621. *         Return                  * enter
  622. *         EditFile                * f3
  623. *         "c:$."                  *
  624. *         "qm"                    *
  625. *         Return                  * enter
  626. *         Quit                    * @x
  627. *         EditFile                * f3
  628. *         Return                  * enter
  629. *         EndFile                 * ^pgdn
  630. *         AddLine                 * ^n_j
  631. *         "* "
  632. *         InsertDate              * ^d
  633. *         InsertTime              * ^e
  634. *         Paste                   * ^c_p
  635. *         UnmarkBlock             * @u
  636.  
  637. *         KillFile                * ^k_z
  638. *
  639.  
  640. * 
  641. * ┌───────────────────────────────────────────────────────────────┐
  642. * │    @(f4) Retrieves a command and it's key from QCONFIG.DAT    │
  643. * └───────────────────────────────────────────────────────────────┘
  644.  
  645. * This macro retrieves a command or all commands matching a selected
  646. * find criteria from your QCONFIG.DAT file, displays the selected
  647. * command(s) and it's key on the screen, and then removes the
  648. * command(s) and it's key from the screen. For those of us who can
  649. * never remember all the commands and can never find our reference
  650. * sheet, this might help.
  651.  
  652. * To run, press Alt_f4, then enter the first letter (or more) of the
  653. * command you want to know the key for, press 'Enter' to see the the
  654. * command(s) and it's key, then press 'Enter' again to remove the
  655. * command(s) and it's key from the screen.
  656.  
  657. * For example, to find the key for appendscrbuff, press:
  658. *                     <Alt_f4>
  659. *                      app
  660. *                     <Enter>
  661.  
  662. * You should see the following highlighted on your screeen:
  663.  
  664. * ^b_a            appendscrbuff
  665.  
  666. * Entering "b" instead shows all commands beginning with "b":
  667.  
  668. * ^h              backspace
  669. * ^home           begscreen
  670. * ^pgup           begfile
  671. * home            begline
  672. * backspace           backspace    *(note, at least 8 spaces required)
  673.  
  674. * Press 'Enter' to remove the command(s) and it's key from the screen,
  675. * or press 'Esc' three times if you want to keep the command(s) on the
  676. * screen for reference.
  677.  
  678. @f4 macrobegin
  679.         unmarkblock insertline begline  * insert temp line
  680.         dropanchor currentfilename      *
  681.         cut                             * delete temp line
  682.         editfile                        *
  683.        "e:\qe\qconfig.dat"  *<<<<<CHANGE
  684.         return                          *
  685.         endline                         * blank to clear scratch
  686.         dropanchor                      * mark to clear scratch
  687.         storescrbuff "1" return         * get to scratch
  688.         unmarkblock begfile             * go to begin qconfig.dat
  689.         FIND "         "                * insert 8 spaces before find
  690.         pause                           * pause for command to find
  691.         return "i" return               * find first command
  692.         Jfalse FAIL:                    * Stop macro if search fails
  693.   jump NEXT:                            *
  694.   START:                                * come here more than 1 find
  695.         find return "i" return          * find next command
  696.   NEXT:                                 *
  697.   jfalse FINISH:                        * mark if found, quit if not
  698.         markline begline                * mark command line
  699.        "* "                             * insert asterisk space
  700.         appendscrbuff "1" return        * append to scratch
  701.         cursordown unmarkblock          * move down line, unmark command
  702.   jump START:                           * see if any more matches
  703.   FINISH:                               * come here after last find
  704.         quit                            * quit qconfig.dat
  705.         editfile paste return           * return to file
  706.         markcolumn                      * start to mark block
  707.         getscrbuff "1" return           * get command and key
  708.         delline begline                 * delete blank line, begline
  709.         maketopofscreen                 * for better viewing
  710.         pause                           * pause, then 'Enter' to..
  711.         deleteblock                     * clean up, remove block
  712.         Jump END:                       *
  713.  FAIL:                                  *
  714.         quit                            * quit qconfig.dat
  715.         editfile paste return           * return to file we were
  716.  END:                                   * editing if search fails
  717. *
  718. * 128 bytes Fri  03-29-1991  16:43:58
  719.  
  720. * 
  721. * ----------------------------------------------------------------------
  722. *    @(F5) Test TRUE/FALSE Results, Tim Farley, author
  723. * ----------------------------------------------------------------------
  724. *
  725. * Date: 07-30-90 (17:34)              Number: 936 / 937
  726. *   To: KARL BRENDEL                  Refer#: 929
  727. * From: TIM FARLEY                      Read: NO
  728. * Subj: Testing TRUE/FALSE result     Status: PUBLIC MESSAGE
  729. * Conf: REGDOS (1)                 Read Type: GENERAL (A)
  730. *
  731. * KB>I'd suggest that when you need to know what a command returns,
  732. * KB>and it appears not to return what you expect, that you write a
  733. * KB>test macro which prints TRUE or FALSE according to the return,
  734. * KB>and experiment with it.
  735. *
  736. * Surprising as it may seem (since I obviously have inside
  737. * knowledge of the editor), I do just this myself!  It's quicker
  738. * for one thing....
  739. *
  740. * Here is the macro I use:
  741. *
  742. * (TH changed key from ^F10 to @F5)
  743.  
  744. @F5  MacroBegin
  745.      JTrue true:
  746.      Find ".F." Pause Escape
  747.      Jump end:
  748.    true:
  749.      Find ".T." Pause Escape
  750.    end:
  751. *
  752. * 28 bytes Mon  07-30-1990  19:58:27 (TH added)
  753.  
  754. * Just re-wrap this to fit on one line, then put it in your
  755. * QCONFIG.DAT.
  756. *
  757. * Then, when you want to test a command, RECORD a macro that starts
  758. * with the command you wish to test, then this macro.  For
  759. * instance, if I wanted to test BegLine <Home>, I would do this:
  760.  
  761. *
  762. *      (1) Press MacroRecord <Ctrl M>
  763. *      (2) Press the key to record.  (I use <Alt F5> usually).
  764. *      (3) Press the key to test, BegLine <Home>.
  765. *      (4) Press the above macro, <Alt F5>
  766. *      (5) End macro recording <Ctrl M>.
  767. *
  768. * Now I can just move my cursor around, and hit <Alt F10>, to test
  769. * the true/false result of BegLine at different positions.  The
  770. * true or false comes up in a nice little box on the screen, and
  771. * when I press Return the box sends itself away, and does not
  772. * damage the file I am editing or anything.
  773. *
  774. * Note if you run the above <Alt F5> macro by itself, it always
  775. * returns TRUE.  QEdit does not remember the True/False state of
  776. * the last command while "idle".  Thus the necessity of recording
  777. * the above within a macro.
  778. *
  779. * --Tim Farley
  780. *   SemWare Technical Support
  781.  
  782. * (Other) Macros available: See ALLMACRO.INF.
  783. * See RFRMxx.QM for other commenting and un-commenting macros.
  784.  
  785. * (Version) History:
  786. *
  787. * 1.0  -  initial version
  788. * 1.1  -  Changed Alt-6 to keep [file].qm in ring after running.
  789. * 1.2  -  Date & time stamp put in dum.qm (Alt-6, Alt-7).
  790. * 1.3  -  Added batch files to macro13.ZIP.
  791. * 1.4  -  Changed Alt-6 & 7 to stamp [file].QM translated from.
  792. *      -  Changed Alt-0 to not pause if no errors.
  793. *      -  Added Alt-5 to see error files in window.
  794. *      -  Changed /W60 to /W70 and removed "pause" in qmact.bat.
  795. * 1.5  -  Changed Alt-7 to not pause if no errors.
  796. * 1.6  -  Shortened Alt-6, 7 & 10. Faster & no pause now if no errors.
  797. * 1.7  -  Corrected Alt-6 to write macros first. Sorry.
  798. * 1.8  -  Added Alt-4 to append text file [file].qm  macros
  799. *         to a "standard" macro and read appended macro.
  800. * 1.9  -  Added Alt-3 to merge designated macro [file].mac
  801. *         with current macros. QEdit normally overwrites
  802. *         current macros when reading a new macro.
  803. * 2.0  -  Added Alt-2 to refresh macro buffer with "standard" macro.
  804. *      -  New qmacTA2.bat for Alt-4, gets "standard" name as %2.
  805. *      -  Added Alt T & Alt N to select txtfile to read from
  806. *         sorted list of all avaialable txtfiles in directory.
  807. *      -  New SORT-T.BAT and SORT-F.BAT for Alt T & N to sort macro list.
  808. *      -  Changed Alt-4 to identify "standard" rather than batch file.
  809. *         (Modify g:\qe\macros for the name of your "standard" macro.)
  810. *      -  Shortened Alt-3,7 & 0, total 91 bytes. (Important when merging
  811. *         since QEdit macro buffer is limited to 2046 bytes macros.)
  812. *      -  Moved macroread to end of Alt-3. No problem, just in case.
  813. *         (Reading macros while executing can sometimes cause problems.)
  814. *      -  Changed Alt-5 to refresh c:!.
  815. * 2.1  -  (Internal)
  816. * 2.2  -  Added Alt-1 to select txtfile to load from list of all txtfiles
  817. *         in directory sorted by Name. Added sort-N2.bat for this macro.
  818. *      -  Changed Alt T & Alt N to select macfile, not txtfile as v2.0,
  819. *         from sorted list of all available macfiles in directory.
  820. *      -  Changed sort-T.bat, sort-N.bat and sort-N1.bat for macrs.
  821. *      -  Renamed MACCMTxx to MACROxx. Dropped MACCMTxx. Macros comments
  822. *         and instructions are now are in MACROxx.qm.
  823. *      -  Shortened highlight bar in Alt N,t. Saves ~30 bytes/macro.
  824. *      -  Changed dum.dir to $ in Alt-4 & qmacTA2.bat to shorten
  825. *      -  Added killfile to Alt-3 & 4. Changed endfile display in Alt-4.
  826. *      -  Replaced "j:\j" with "c:!" in macros and batch files to shorten.
  827. *      -  Changed qmacTA2.bat for better display.
  828. *      -  Changed select window from "c:!" to "c:$" in batch files
  829. *      -  Sort batch files (sort-xx.bat) also changed.
  830. * 2.3  -  Changed  @5 to keep error file c:! in ring.
  831. *      -  By removing " "'s, changing file name tracking in buffers,
  832. *         and shortening header and footer labels:
  833. *               - shortened @4        28 bytes
  834. *               - shortened @5         5  "
  835. *               - shortened @6        67  "
  836. *               - shortened @7        24  "
  837. *               - shortened @9         3  "
  838. *      -  Added macro size 'bytes line' at end of each macro
  839. * 2.4  -  Removed dum.qm and dum.mac from zip package
  840. *      -  Shortened Alt_6 from 147 to  54 bytes
  841. *      -  Shortened Alt_7 from 258 to 194 bytes
  842. * 2.4a -  Modified @6 and description
  843. * 2.4b -  Modified documentation.
  844. * 2.4c -  Changed file name from MACROxx to MACRxx.
  845. * 2.5  -  Changed j:j to c:! in macros and batch files.
  846. *      -  Changed down arrow #25 to ! in ^0.
  847. *      -  Changed .LST and .QL files.
  848. *      -  Removed @1, @t and @n. Newer macros to do the same thing
  849. *         are in FILExx.ZIP.
  850. * 2.6  -  Added @t, smaller faster version of @7.
  851. *      -  Added @q, smaller faster version of @0.
  852. *      -  Added @f1, @f2, @f3 and @f4 from GETCxx.ZIP and COLxx.ZIP,
  853. *         which are no longer included as seperate files, but are now
  854. *         a part of MACRxx.ZIP.
  855. *      -  Modified and shortened all but @2, @6, @8, @9 and ^1.
  856. *      -  Added killfile to @6 so writeblock return works correctly.
  857. * 2.6a -  Changed ^1 help macro key to @h key.
  858. * 2.7  -  Removed [d:]\[path] for location of QMAC from QMACxxx batch
  859. *         files. QMAC can be located anywòere in path.
  860. * 2.7a -  Modified documentation and added START.BAT.
  861. *      -  Change MACRO file names to MACR.
  862. * 2.7b -  Corrected @h Index Use instructions.
  863. * 2.8  -  Changed 4 to 8 spaces in Find for @f2 - @f4 to correctly
  864. *         find command and key.
  865. * 2.9  -  Corrected @f4 which had a missing return.
  866. * 3.0  -  Modified @F4 to stop on failed searches.
  867. * 3.1  -  Modified @3, @4, @7 and @0, also with more comments.
  868. *      -  Added @F5 written by Tim Farley.
  869. *      -  Removed unnecessary c:$.qm from @7.
  870. * 3.1a -  Changed documentation.
  871. *      -  Included v3.1a in AMAC39.ZIP, July 21, 1991.
  872. * 3.1b -  Corrected @F5 documentation, key references were wrong.      7/30/91
  873. *      -  Added latest version of @h from BOOKxx.QM.                   7/31/91
  874. *      -  MACR.DOC had old f:\.  Corrected to e:\.                     7/31/91
  875. *
  876. *
  877. *
  878. * error_sample, remove asterisk to test for errors
  879.